import {
  BeforeApplicationShutdown,
  Injectable,
  OnApplicationBootstrap,
  OnApplicationShutdown,
  OnModuleDestroy,
  OnModuleInit,
} from '@nestjs/common';

@Injectable()
export class AppService
  implements
    OnModuleInit,
    OnApplicationBootstrap,
    OnModuleDestroy,
    BeforeApplicationShutdown,
    OnApplicationShutdown
{
  getHello(): string {
    return 'app interface getHello is called';
  }
  onModuleInit() {
    console.log('AppService onModuleInit');
  }
  onApplicationBootstrap() {
    console.log('AppService onApplicationBootstrap');
  }
  onModuleDestroy() {
    console.log('AppService onModuleDestroy');
  }

  beforeApplicationShutdown() {
    console.log('AppService beforeApplicationShutdown');
  }
  onApplicationShutdown() {
    console.log('AppService onApplicationShutdown');
  }
}
